package com.fqgj.sentry.policy.dao;

import com.fqgj.common.base.BaseMapper;
import com.fqgj.sentry.policy.entity.PcPolicySetsEntity;

import java.util.List;

/**
 * User: yujianfu
 * Date: 2017-07-12
 * Time: 09:37:58.136
 */

public interface PcPolicySetsDao extends BaseMapper<PcPolicySetsEntity> {

    /**
     * @param appId
     * @return
     */
    List<PcPolicySetsEntity> selectByAppIdsAndPage(Long appId);

    /**
     * 搜索该应用下有没有已经存在的策略集事件
     * @param eventId
     * @param appId
     * @return
     */
    PcPolicySetsEntity selectOneByEventAndApp(Long eventId,Long appId);


    /**
     *
     * @param code
     * @return
     */
    PcPolicySetsEntity selectOneByCode(String code);

    /**
     *
     * @param eventId
     * @return
     */
    List<PcPolicySetsEntity> selectByEventId(Long eventId);



}